@mixin center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%)
}

@mixin borderScale($direction) {
  @if ($direction=='top') {
    $direction: 'before';
  } @else if ($direction=='bottom') {
    $direction: 'after';
  }
  &:#{$direction} {
    content: '';
    height: 1px;
    right: 0;
    left: 0;
    @if ($direction=='before') {
      top: 0;
      border-top: 1px #E5E5E5 solid;
    } @else if ($direction=='after') {
      bottom: 0;
      border-bottom: 1px #E5E5E5 solid;
    }
    position: absolute;
    transform-origin: 0 0;
    transform: scaleY(.6);
  }
}

@mixin fullScreen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

@mixin wh($width, $height) {
  width: $width;
  height: $height;
}

@mixin sc($size, $color) {
  font-size: $size;
  color: $color;
}

@mixin fj($type: space-between) {
  display: flex;
  justify-content: $type;
}

@mixin fja($jc:center,$ai:center) {
  display: flex;
  justify-content: $jc;
  align-items: $ai;
}

@mixin wot($ws:nowrap,$of:hidden,$tof:ellipsis) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
}

//box-sizing
@mixin bs($type:border-box) {
  box-sizing: $type;
}
